import axios from 'axios';

let baseUrl = 'https://www.lenmotion.cn/api';

export default {
    // 获取首页轮播
    getIndexBanner() {
        return axios({
            headers: { 'X-Requested-With': 'XMLHttpRequest' },
            method: 'get',
            url: `${baseUrl}/index/banner`
        })
    },
    // 获取首页导航
    getIndexNav() {
        return axios({
            headers: { 'X-Requested-With': 'XMLHttpRequest' },
            method: 'get',
            url: `${baseUrl}/index/nav`
        })
    },
    // 获取首页分类
    getIndexCat() {
        return axios({
            headers: { 'X-Requested-With': 'XMLHttpRequest' },
            method: 'get',
            url: `${baseUrl}/index/category`
        })
    },
    // 获取分类页分类
    getCatNav() {
        return axios({
            headers: { 'X-Requested-With': 'XMLHttpRequest' },
            method: 'get',
            url: `${baseUrl}/category/list`
        })
    },
    // 获取分类数据
    getCatInfos(id) {
        return axios({
            headers: { 'X-Requested-With': 'XMLHttpRequest' },
            method: 'get',
            url: `${baseUrl}/category/home/${id}`
        })
    }
}